<div id="content">
	
	<div class="post">
		<h2 class="title"><a href="#">add new code component</a></h2>
		<!--<p class="meta">
			<span class="date"></span>
			<span class="posted"></span>
		</p> -->
 		<div style="clear: both;">&nbsp;</div>
		<div class="entry">
			<p>
			<?php 
				
				  if(count($codesystems_list->result()) == 0){
					echo "<br/>No code systems found. Please add a code system first. ";
				  }
				  else{
			  		  $options = array();
				 	  foreach($codesystems_list->result() as $r){
				  			$id = $r->coding_system_id;
				  			$name = $r->coding_system_name;
				  			$options[$id] = $name;
				       }
					
						echo form_open('site/insert_codecomponent');
					
						$input_component_name = array(
			              'name'        => 'component_name',
			              'id'          => 'login-text',
			              'maxlength'   => '50',
			              'size'        => '50',
			            );
			            
			            $input_component_description = array(
			              'name'        => 'component_description',
			              'id'          => 'login-text',
			              'maxlength'   => '50',
			              'size'        => '50',
			            );
						
			          
			            
			            echo "<span class=\"field-descriptor\">Code System Name: <br/></span>".form_dropdown('code_system_id', $options);
			            
			            echo "<br/><br/><span class=\"field-descriptor\">Code Component Name: <br/></span>".form_input($input_component_name);
						
			            echo "<br/><span class=\"field-descriptor\">Component Description: <br/></span>".form_input($input_component_description);
			            
			            echo "<br/><br/>";
			            
						echo form_submit('submit','Add');
						
						echo form_close();
				
				}// end code types list else 
			?>
			</p>
		</div>
	</div>
	<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #content -->